<!-- 板块页面配置 -->
<template>
  <div>
    <Step1 v-if="step === 1" @nextStep="handleClick(2)" />
    <Step2 v-else @lastStep="handleClick(1)" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import Step1 from "./step1.vue";
import Step2 from "./step2.vue";
import { usePagesStore } from "@/store/modules/pages";

const step = ref(1);

function setDefault() {
  const { resourceLeaguePlateSetStep } = usePagesStore();
  step.value = resourceLeaguePlateSetStep;
};
setDefault();
const handleClick = (data: 1 | 2) => {
  const { setResourceLeaguePlateSetStep } = usePagesStore();
  step.value = data;
  setResourceLeaguePlateSetStep(data)
};
</script>

<style lang="less" scoped>

</style>
